Skip to content

[nrf noup] boot: zephyr: nrf_cleanup: clean all enabled UARTE instances - #694

Open
cqfmh wants to merge 1 commit into
nrfconnect:mainfrom
cqfmh:nrf91-uarte-cleanup-dt
Open

[nrf noup] boot: zephyr: nrf_cleanup: clean all enabled UARTE instances#694
cqfmh wants to merge 1 commit into
nrfconnect:mainfrom
cqfmh:nrf91-uarte-cleanup-dt

Conversation

@cqfmh

@cqfmh cqfmh commented Jun 20, 2026

Copy link
Copy Markdown

Problem

nrf_cleanup_peripheral()'s UARTE list is hardcoded and misses some EasyDMA-capable
instances, so a UARTE left active by the previous image can keep its EasyDMA running
into the next image after chain-load and fault it.

Fix

Build the list from devicetree (DT_FOREACH_STATUS_OKAY(nordic_nrf_uarte, ...)) so every
enabled UARTE is quiesced, and stop the TX direction alongside RX before disabling.

Verified on hardware.

@cqfmh
cqfmh requested a review from a team as a code owner June 20, 2026 08:13
@NordicBuilder

Copy link
Copy Markdown

none

Note: This comment is automatically posted and updated by the Contribs GitHub Action.

@cqfmh
cqfmh force-pushed the nrf91-uarte-cleanup-dt branch from e2a352b to 734b8e0 Compare June 20, 2026 08:24
@cqfmh cqfmh changed the title Nrf91 uarte cleanup dt [nrf noup] boot: zephyr: nrf_cleanup: clean all enabled UARTE instances Jun 20, 2026
The UARTE cleanup list was hardcoded and missed EasyDMA-capable instances
on some SoCs, so a UARTE left active by the previous image could keep
writing RAM via EasyDMA after chain-load and fault the next image.

Derive the list from devicetree (DT_FOREACH_STATUS_OKAY) so every enabled
UARTE is quiesced, and stop the TX direction alongside RX before disabling.

Signed-off-by: cqfmh <258567898+cqfmh@users.noreply.github.com>
@cqfmh
cqfmh force-pushed the nrf91-uarte-cleanup-dt branch from 734b8e0 to 4f54848 Compare June 20, 2026 08:27
@sonarqubecloud

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants